{% extends 'base.html' %}

{% block title_suffix %}
    | Text Artefacts
{% endblock %}

{% block stylesheets %}
{% endblock %}

{% block all_content %}
	<div class="page-header">
		<h1>
			Edit Text Artefacts
		</h1>
	</div>

	<table id="artefact-table" class="table table-condensed table-bordered table-striped">
		<thead>
			<tr>
				<th style="text-align: right;">Artefact</th>
				<th>Content</th>
				<th>Actions</th>
			</tr>
		</thead>
	    <tbody>
	    	{% for text in texts %}
		    	<tr>
		    		<td style="text-align: right;">
		    			<strong>{{ text.name }}</strong>
		    		</td>
		    		<td>
						{{ text.html|truncatechars:250 }}
		    		</td>
		    		<td>
		    			<a href="{% url 'engonline.views.edit_text_artefact' text_artefact=text.name %}" class="btn btn-link">
							<i class="icon-edit"></i> Edit
						</a>
		    		</td>
		    	</tr>
	    	{% empty %}
	    		<!-- End table -->
				    	</tbody>
			    </table>
    		    <div class="alert alert-error">
				    <strong>Error!</strong> There are no stored text artefacts.
			    </div>
	    	{% endfor %}
	    </tbody>
    </table>
	

{% endblock %}

{% block scripts %}
{% endblock %}